package com.order.itemcategoryproject.service.lmpl;

import com.order.itemcategoryproject.mapper.dArcItemPicFKMapper;
import com.order.itemcategoryproject.pojo.dArcItemPicFk;
import com.order.itemcategoryproject.pojo.dQiyeSendMsg;
import com.order.itemcategoryproject.service.dArcItemPicFkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class dArcItemPicFkServicelmpl implements dArcItemPicFkService {


    @Autowired
    private dArcItemPicFKMapper dArcItemPicFKMapper;

    /**
     * 添加被反馈意见图片
     *
     * @param dArcItemPicFks
     */
    @Override
    public int insertImgFkOpinion(dArcItemPicFk dArcItemPicFks) {
        return dArcItemPicFKMapper.insertImgFkOpinion(dArcItemPicFks);
    }


    /**
     * 根据商品编号以及客户编号获取当前是否已经添加反馈
     *
     * @param cusCode
     * @param itemId
     * @return
     */
    @Override
    public List<dArcItemPicFk> selectAllImgFkByCusIdAndItemId(String cusCode, String itemId) {
        return dArcItemPicFKMapper.selectAllImgFkByCusIdAndItemId(cusCode, itemId);
    }

    /**
     * 根据客户名称以及商品编号和序号来获取当前反馈对象
     *
     * @param cusCode
     * @param itemId
     * @param series
     * @return
     */
    @Override
    public dArcItemPicFk selectErrorFkInfoByCusIdAndItemIdAndSeries(String cusCode, String itemId, int series) {
        return dArcItemPicFKMapper.selectErrorFkInfoByCusIdAndItemIdAndSeries(cusCode, itemId, series);
    }

    /**
     * 对商品反馈意见进行更细
     *
     * @param itemId
     * @param cusCode
     * @param series
     * @param fkyj
     * @return
     */
    @Override
    public int updateErrImgFkByItemIdAndCusIdAndSeries(String itemId, String cusCode, int series, String fkyj) {
        return dArcItemPicFKMapper.updateErrImgFkByItemIdAndCusIdAndSeries(itemId, cusCode, series, fkyj);
    }


}
